import { defHttp } from "@/utils/http";

// ERP 记账分录表，记录财务交易API
export const bookkeepApi = {
	// 获得记账分录表，记录财务交易分页
	bookkeepList: async (params: any) => {
		return await defHttp.get({ url: `/his/bookkeep/page`, params });
	},
	// 新增记账分录表，记录财务交易
	bookkeepCreate: async (data: any) => {
		return await defHttp.post({ url: `/his/bookkeep/bookkeepcreate`, data });
	},

	// 修改记账分录表，记录财务交易
	bookkeepUpdate: async (data: any) => {
		return await defHttp.put({ url: `/his/bookkeep/update`, data });
	},

	// 删除记账分录表，记录财务交易
	bookkeepDelete: async (id: number) => {
		return await defHttp.delete({ url: `/his/bookkeep/delete?id=` + id });
	}
};
